class HandoverNewEntity {
  List<HandoverNewInfo>? data;

  HandoverNewEntity({
    this.data,
  });

  factory HandoverNewEntity.fromJson(Map<dynamic, dynamic> json) {
    final originList = json['data'] as List?;
    List<HandoverNewInfo> list = [];
    for(var item in originList??[]){
      if(item is List){
        for(var entity in item){
          var value =  HandoverNewInfo.fromJson(entity);
          list.add(value);
        }
      }else{
        var value =  HandoverNewInfo.fromJson(item);
        list.add(value);
      }
    }
    // List<HandoverNewInfo> protocolList =
    //     (originList??[]).map((value) => HandoverNewInfo.fromJson(value)).toList();
    return HandoverNewEntity(
      data: list,
    );
  }
}

class HandoverNewInfo {
  String? dutyTypeDesc;
  String? dutyTypeName;
  String? week;
  String? reportDate;
  int? dutyType;
  int? id;
  String? startTime;
  String? endTime;

  HandoverNewInfo({
    this.dutyTypeDesc,
    this.dutyTypeName,
    this.week,
    this.reportDate,
    this.dutyType,
    this.id,
    this.startTime,
    this.endTime
  });

  HandoverNewInfo.fromJson(Map data) {
    dutyTypeDesc = data['dutyTypeDesc'];
    dutyTypeName = data['dutyTypeName'];
    week = data['week'];
    reportDate = data['reportDate'];
    dutyType = data['dutyType'];
    id = data['id'];
    startTime = data['startTime'];
    endTime = data['endTime'];
  }
}
